﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="IncludeLog.aspx.cs" Inherits="SiteNavigation_IncludeLog" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
 <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" defer="defer" src="../My97DatePicker/WdatePicker.js"></script>
    <script src="../js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../js/jquery.autocomplete.js" type="text/javascript"  language="javascript"></script>
    <script src="../js/StockSearchData.js" language="javascript" type="text/javascript"></script>
    <script src="../js/jquery.query.url.js" type="text/javascript" language="javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#cbkAll").click(function () {
                var chks = $("input[tt=aa]");
                for (var i = 0; i < chks.length; i++) {
                    chks[i].checked = this.checked;
                }
            })
            $("#btnDel").click(function () {
                var chks = $("input[tt=aa]");
                document.getElementById("hidIds").value = "";
                var ids = "";
                for (var i = 0; i < chks.length; i++) {
                    if (chks[i].checked) {
                        ids += chks[i].value + ",";
                    }
                }
                ids = ids.substring(0, ids.length - 1);
                document.getElementById("hidIds").value = ids;

                if (confirm("是否删除?")) {
                    document.location = 'delInclude.aspx?ids=' + ids;
                }
                return false;
            })
        })
//        function chkDel() {
//            var flag = chk();
//            if (flag == false)
//                alert("请选择要删除的行！");
//            return flag;
//        }
//        var chkIDLen = document.getElementsByName("chkID")
//        function chk() {
//            var flag = false;
//            for (var i = 0; i < chkIDLen.length; i++) {
//                if (document.getElementById("chkID_" + i).checked == true) {
//                    flag = true;
//                    break;
//                }
//            }
//            return flag;
//        }
       </script>
   
    </head>
<body>
    <form id="form1" runat="server">
         <input id="Hidden1" type="hidden" runat="server" />
     <div>
            <asp:Button ID="btnDel" runat="server" Text="删除"  />
           
        </div>
    <div>
        <input id="hidIds" type="hidden" runat="server" />
        <table class="data_list_table" style="width:80%">
            <tr>
                 <th >
                    <input id="cbkAll" type="checkbox" />
                    全选
                </th>
                <th style="width:20%">
                    网站名称
                </th>
                <th style="width:50%">
                    链接地址
                </th>
               
                <th style="width:15%">
                    操作
                </th>   
            </tr>
            <asp:Repeater ID="Repeater1" runat="server">
                <ItemTemplate>
                    <tr>
                      <td class="list_data_text">
                            <input name="select" value='<%# Eval("id") %>' type="checkbox" tt="aa" id="select"
                                runat="server" />
                        </td>
                        <td class="list_data_text">
                           <a href='includeShow.aspx?id=<%# Eval("id") %>'><%# Eval("SiteName") %></a>
                        </td>
                        <td class="list_data_text">
                           <a target="_blank"  href='<%# Eval("SiteUrl")%>'><%# Eval("SiteUrl")%></a>
                        </td>
                    <td class="list_data_number">
                                <a href='delInclude.aspx?ids=<%# Eval("id") %>&page=<%=GetPage() %>'
                                    onclick="return confirm('确定删除？')">
                                    <img src="../images/bt_del.gif" alt="删除" />
                                </a>
                        </td>
                  
                  
                    
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
            <tr>
                <th colspan="4" class="pager">
                    <div class="pager">
                        
                        <webdiyer:AspNetPager ID="AspNetPager1" runat="server"  PageSize="1" 
                            UrlPaging="True" >
                        </webdiyer:AspNetPager>
                        
                    </div>
                </th>
            </tr>
        </table>
    </div>
      
    </form>
</body>
</html>

